package com.icss.pojo;

import com.icss.common.GroupA;
import com.icss.common.GroupB;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
public class Data0 implements Serializable {

    @Pattern(regexp="^[0-9A-Za-z_]{6,16}$",  message = "name必须输入6-16位字母数字下划线", groups = {GroupA.class})
    @NotBlank(message = "name必须输入", groups = {GroupA.class, GroupB.class})
//    @Length(min = 6, max = 16, message = "name必须输入6-16位")
    private String name;
    private int age;

}
